package lv.solcraft.replication.client;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.StatefulJob;
import org.springframework.context.ApplicationContext;

public class ReplicationSendJob implements StatefulJob {

    public void execute(JobExecutionContext jobContext) throws JobExecutionException {
        ApplicationContext context = (ApplicationContext) jobContext.getJobDetail().getJobDataMap().get("context");
        OperSender session = (OperSender) context.getBean("operSender");
        session.execute();
    }
}
